const store = {
	state: {
		id: null,
		next: null
	},
	
	mutations: {
		updateId(state, id) {
			state.id = id
		},
		updateNext(state, next) {
			state.next = next
		}
	},
	
	actions: {
		setSuccessNext({ commit }, {
			id = null,
			next = null
		}) {
			id && commit('updateId', id)
			next && commit('updateNext', next)
		}
	},
	namespaced: true
}

export default store
